package com.lsk.netdisk.gateway.controller;

import com.lsk.netdisk.common.response.aspect.annotation.JsonReturn;
import com.lsk.netdisk.gateway.helper.RequestHelper;
import com.lsk.netdisk.gateway.util.WebUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
public class Controller {
	@Autowired
	private RequestHelper requestHelper;

	@JsonReturn
	@RequestMapping("/auth/*")
	public Object auth(HttpServletRequest req, HttpServletResponse resp){
		return WebUtil.processResponse(requestHelper.handleAuth(req),resp);
	}
}
